<template>
  <div>
    <section class="mycontent">
      {{content.content}}
    </section>
    <section class="time">
      {{content.create_time}}
    </section>
    <section class="bode"></section>
    <section class="huifu" v-if="content.admin_content">回复</section>
    <section class="admin-content">{{content.admin_content}}</section>
  </div>
</template>

<script>
import { proposalCount } from '@/api/center'
export default {
  data () {
    return {
      proposal_id: '',
      content: ''
    }
  },
  beforeCreate () {
    this.$store.commit('updateLoadingStatus', { isLoading: false })
  },
  created () {
    this.proposal_id = this.$route.query.proposal_id
    this.getproposalCount()
  },
  methods: {
    getproposalCount () {
      let request = {
        app_id: this.$store.state.app_id,
        user_id: this.$store.state.member_id,
        proposal_id: this.proposal_id
      }
      proposalCount(request).then(res => {
        let { code, data } = res.data
        if (code === 200) {
          this.content = data
          console.log(data)
        }
      })
    }
  }
}
</script>

<style scoped>
.mycontent {
  margin: calc(100vw * 40 / 750) calc(100vw * 30 / 750);
  font-family: PingFangSC-Regular;
  font-size: 15px;
  color: #333333;
}
.time {
  margin: 0 calc(100vw * 30 / 750) calc(100vw * 30 / 750) calc(100vw * 30 / 750);
  text-align: right;
  font-family: PingFangSC-Regular;
  font-size: 14px;
  color: #999999;
}
.bode {
  width: 100%;
  height: 1px;
  background: #eeeeee;
}
.huifu {
  font-family: PingFangSC-Semibold;
  font-size: 18px;
  color: #333333;
  margin: calc(100vw * 20 / 750) calc(100vw * 30 / 750) calc(100vw * 30 / 750)
    calc(100vw * 20 / 750);
}
.admin-content {
  margin: calc(100vw * 40 / 750) calc(100vw * 30 / 750);
  font-family: PingFangSC-Regular;
  font-size: 15px;
  color: #333333;
}
</style>
